home *** CD-ROM | disk | FTP | other *** search
Wrap
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Edit Page</title> <!--- Read from the database Record ID = 2 and write this result to a hidden field ---> <!--- Note that the ASP code runs on the server, the browser does not see this code only what is written into the hidden field ---> <% myDSN="DSN=editor" mySQL="select Edit_html from WYSIWYG where edit_id=2" set conntemp=server.createobject("adodb.connection") conntemp.open myDSN set rstemp=conntemp.execute(mySQL) if rstemp.eof then response.write "no data for<br>" response.write mySQL conntemp.close set conntemp=nothing response.end end if %> <script language="VBScript"> Sub OnLoad frmMain.eWebEdit1.TextHTML = frmMain.TextHTMLHField.Value End Sub Sub btnSave_OnClick frmMain.TextHTMLHField.Value = frmMain.eWebEdit1.TextHTML End Sub </script> </head> <!--- The Onload event occurs when the browser finish loading the page This will cause the the vbscript to move the contents of the hidden field to the editor---> <body language="VBScript" onload="OnLoad"> <table width="625" cellpadding="0" cellspacing="0" border="0"> <tr> <td width="113" height="35" valign="TOP" bgcolor="#639C63"><a href="http://www.ektron.com"><img src="EKlogo.gif" width=113 height=35 alt="" border=0></a></td> <td width="505" align="CENTER" valign="BOTTOM" bgcolor="#639C63"></td> </tr> <tr> <td align="CENTER" valign="TOP" bgcolor="#639C63"><img src="http://www.ektron.com/images/space.gif" width=1 height=300 alt="" border="0"></td> <td align="center" valign="top"> <table width="90%" cellspacing="2" cellpadding="2"> <tr> <!--- When you click the Save button, the VBSCRIPT OnClick event will occur ---> <form action="update.asp" method="POST" enablecab="No" name="frmMain"> <tr> <td align="center"> </td> </tr> <tr> <td><font face="verdana, arial, helvetica" size="2">Note this License Key is for IP address 127.0.0.1, to purchase one for your domain name click <a href="https://www.ektron.com/ccproc/creditcard.cfm">here</a></font></td> </tr> <tr> <td align="center"> </td> </tr> <tr> <td> <object id="eWebEdit1" name="eWebEdit1" classid="clsid:5D479C55-C4BA-11D2-B97C-002078159EC3" CODEBASE="eWebEdit.CAB#version=2,3,0,0" border="0" width="535" height="345"> <param name="License" value="127.0.0.1?650630331830908"> <param name="License2" value="localhost?850330421323576"> <param name="License3" value=""> <param name="TextHTML" value=""> <param name="FontSize" value="2"> <param name="FontName" value="Arial"> <param name="ButtonsEdit" value="True"> <param name="ButtonsFontSize" value="True"> <param name="ButtonsFontStyle" value="True"> <param name="ButtonsFontColor" value="True"> <param name="ButtonsBullets" value="True"> <param name="ButtonsIndent" value="True"> <param name="ButtonsAlign" value="True"> <param name="ButtonsHyperlink" value="True"> <param name="ButtonsPicture" value="True"> <param name="ButtonsAbout" value="True"> <param name="FTPServer" value="ftp.somenameorip.com"> <param name="FTPUsername" value="someusername"> <param name="FTPPassword" value="encryptedpassword"> <param name="ImagesPath" value="../images"> <param name="WDDX" value="<field name='IMAGE_TITLE'><string>Company Logo</string></field><field name='IMAGE_LOCATION'><string>images/logo.jpg</string></field><field name='FONT_FACE'><string>Arial</string><string>New Times Roman</string></field>"> </object> <!--- This hidden field gets loaded from the database record 2 ---> <input type="hidden" name="TextHTMLHField" value="<% response.write rstemp.Fields("Edit_html") %>"> </td> </tr> <tr> <!--- If you were were doing an Edit of a doucment you could use ASP to fill in the Hidden field then call the function below called on Click ---> <td align="center"><input type="Submit" name="btnSave" value="Save"></td> </tr> </form> </table> </td> </tr> </table> </body> </html>